package edu.centenary.assignmenttracker;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MySQLiteHelper extends SQLiteOpenHelper {
	
	private static final String DATABASE_NAME ="Assignment.db";
	private static final int DATABASE_VERSION = 1;
	
	public MySQLiteHelper(Context c){
		super(c, DATABASE_NAME, null, DATABASE_VERSION);
	}
	
	public static final String TABLE_TRACKER ="Assignments";
	public static final String TRACKER_ID = "id";
	public static final String TRACKER_TEXT = "mytext";
	public static final String TRACKER_DATE = "mydate";
	
	public static final String DATABASE_CREATE = 
		"CREATE TABLE" + TABLE_TRACKER + "(" +TRACKER_TEXT + " text, " 
		+TRACKER_DATE + " text, " + TRACKER_ID + " integer primary key autoincrement);" ;

	@Override
	public void onCreate(SQLiteDatabase database) {
		database.execSQL(DATABASE_CREATE);

	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		// TODO Auto-generated method stub

	}

}
